package com.sinochem.yunlian.ship.common.rest;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;

import com.sinochem.yunlian.ship.common.biz.BaseBiz;
import com.sinochem.yunlian.ship.common.constant.CommonConstants;

/**
 * ${DESCRIPTION}
 *
 * @author ship-admin
 * @create 2017-06-15 8:48
 */
public class BaseController<Biz extends BaseBiz,Entity> {
	
    @Autowired
    protected HttpServletRequest request;
    
    @Autowired
    protected Biz baseBiz;

    public String getCurrentUserId(){
        String currentUserId = request.getHeader(CommonConstants.CUR_USER_ID);
        return currentUserId;
    }

    public String getCurrentAppClientVersion(){
        String clientVersion = request.getHeader(CommonConstants.APP_CLIENT_VERSION);
        return clientVersion;
    }

    public String getCurrentAppId(){
        String appId = request.getHeader(CommonConstants.APP_ID);
        return appId;
    }

}
